## Tracker插件Makefile

# 编译器和标志
CC = gcc
CXX = g++
CFLAGS = -c -Wall -Wno-multichar
LDFLAGS = -lbe -ltracker

# 目标文件
TARGET = ../../build/HZip

# 源文件
SRCS = TrackerAddOn.cpp ../core/HZipEngine.cpp ../formats/ZipFormat.cpp ../formats/TarFormat.cpp ../formats/GzipFormat.cpp ../formats/Bzip2Format.cpp

# 目标文件
OBJS = $(SRCS:.cpp=.o)

# 默认目标
all: $(TARGET)

# 链接规则
$(TARGET): $(OBJS)
	$(CXX) -o $@ $(OBJS) $(LDFLAGS)

# 编译规则
.cpp.o:
	$(CXX) $(CFLAGS) $< -o $@

# 清理规则
clean:
	rm -f $(OBJS) $(TARGET)

# 安装规则
install: $(TARGET)
	mkdir -p /boot/system/add-ons/Tracker
	cp $(TARGET) /boot/system/add-ons/Tracker/

# 卸载规则
uninstall:
	rm -f /boot/system/add-ons/Tracker/$(TARGET)